package com.mercury.ec.module.air.controller.admin.demandorder.vo.demandorder;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.mercury.ec.framework.excel.core.annotations.DictFormat;
import com.mercury.ec.framework.excel.core.convert.DictConvert;
import com.mercury.ec.module.air.controller.admin.demandorder.vo.demandscheme.AirDemandSchemeRespVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 机票需求订单 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AirDemandOrderRespVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8244")
    private Long id;

    @Schema(description = "需求单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("需求单号")
    private String no;

    @Schema(description = "客户id 见表（basic_customer.id）", requiredMode = Schema.RequiredMode.REQUIRED, example = "26965")
    private Long customerId;

    @Schema(description = "客户编号")
    @ExcelProperty("客户编号")
    private String customerNo;

    @Schema(description = "客户名称", example = "王五")
    @ExcelProperty("客户名称")
    private String customerName;

    @Schema(description = "申请人id 见表（system_users.id）", requiredMode = Schema.RequiredMode.REQUIRED, example = "27903")
    private Long applyUserId;

    @Schema(description = "申请人", example = "王五")
    @ExcelProperty("申请人")
    private String applyUserNickname;

    @Schema(description = "航程信息", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("航程信息")
    private String flightInfo;

    @Schema(description = "预订员id 见表（system_users.id）", requiredMode = Schema.RequiredMode.REQUIRED, example = "21534")
    private Long bookUserId;

    @Schema(description = "预订员", example = "王五")
    @ExcelProperty("预订员")
    private String bookUserNickname;

    @Schema(description = "预订部门id 见表（system_dept.id）", requiredMode = Schema.RequiredMode.REQUIRED, example = "450")
    private Long bookDeptId;

    @Schema(description = "预订部门", example = "王五")
    @ExcelProperty("预订部门")
    private String bookDeptName;

    @Schema(description = "预订时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("预订时间")
    private LocalDateTime bookTime;

    @Schema(description = "是否锁单")
    @ExcelProperty(value = "是否锁单", converter = DictConvert.class)
    @DictFormat("infra_boolean_string") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Boolean locked;

    @Schema(description = "锁单员id 见表（system_users.id）", example = "31984")
    private Long lockUserId;

    @Schema(description = "锁定员", example = "王五")
    @ExcelProperty("锁定员")
    private String lockUserNickname;

    @Schema(description = "锁单部门id 见表（system_dept.id）", example = "2728")
    private Long lockDeptId;

    @Schema(description = "锁定部门", example = "王五")
    @ExcelProperty("锁定部门")
    private String lockDeptName;

    @Schema(description = "锁单时间")
    @ExcelProperty("锁单时间")
    private LocalDateTime lockTime;

    @Schema(description = "最后报价操作员id 见表（system_users.id）", example = "1703")
    private Long finallyQuoteUserId;

    @Schema(description = "最后报价操作员", example = "王五")
    @ExcelProperty("最后报价操作员")
    private String finallyQuoteUserNickname;

    @Schema(description = "最后报价部门id 见表（system_dept.id）", example = "26726")
    private Long finallyQuoteDeptId;

    @Schema(description = "最后报价部门", example = "王五")
    @ExcelProperty("最后报价部门")
    private String finallyQuoteDeptName;

    @Schema(description = "最后报价时间")
    @ExcelProperty("报价时间")
    private LocalDateTime finallyQuoteTime;

    @Schema(description = "最后核价操作员id 见表（system_users.id）", example = "1703")
    private Long finallyPricingUserId;

    @Schema(description = "最后核价操作员", example = "王五")
    @ExcelProperty("最后核价操作员")
    private String finallyPricingUserNickname;

    @Schema(description = "最后核价部门id 见表（system_dept.id）", example = "26726")
    private Long finallyPricingDeptId;

    @Schema(description = "最后核价部门", example = "王五")
    @ExcelProperty("最后核价部门")
    private String finallyPricingDeptName;

    @Schema(description = "最后核价时间")
    @ExcelProperty("核价时间")
    private LocalDateTime finallyPricingTime;

    @Schema(description = "取消规则id 见表（train_cancel_rule.id）", example = "31036")
    private Long cancelRuleId;

    @Schema(description = "取消操作员id 见表（system_users.id）", example = "3484")
    private Long cancelUserId;

    @Schema(description = "取消操作员", example = "王五")
    @ExcelProperty("取消操作员")
    private String cancelUserNickname;

    @Schema(description = "取消部门id 见表（system_dept.id）", example = "25953")
    private Long cancelDeptId;

    @Schema(description = "取消部门", example = "王五")
    @ExcelProperty("取消部门")
    private String cancelDeptName;

    @Schema(description = "取消时间")
    @ExcelProperty("取消时间")
    private LocalDateTime cancelTime;

    @Schema(description = "取消原因")
    @ExcelProperty("取消原因")
    private String cancelCause;

    @Schema(description = "联系人")
    @ExcelProperty("联系人")
    private String contact;

    @Schema(description = "联系人电话")
    @ExcelProperty("联系人电话")
    private String contactPhone;

    @Schema(description = "订单状态 字典（air_demand_order_status）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "订单状态", converter = DictConvert.class)
    @DictFormat("air_demand_order_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer status;

    @Schema(description = "备注", example = "你猜")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "方案列表", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<AirDemandSchemeRespVO> demandSchemes;
}
